
var rp = require('request-promise');
var cheerio = require('cheerio'); // Basically jQuery for node.js

var options = {
    uri: 'http://www.baidu.com',
    transform: function (body) {
        return cheerio.load(body);
    }
};

rp(options)
    .then(function ($) {
        console.log($.html());
        // Process html like you would with jQuery...
    })
    .catch(function (err) {
        console.log("出错了");
        // Crawling failed or Cheerio choked...
    });